//----------------------------------------------------------------------------------------
// @Project Includes
#include "includes.h"

//----------------------------------------------------------------------------------------
// @Local Macro Define in the module

//----------------------------------------------------------------------------------------
// @Local Type defines in the module

//----------------------------------------------------------------------------------------
// @Global Variables define in the module
/*注意：以下部分任何工程不可更改，与升级相关*/
#define MAGIC_ADDR_BASE   (0x8005000) /*存放魔术字的特殊地址，防止升错版本*/
const char cRevision_Magic[] __attribute__((at(MAGIC_ADDR_BASE + 0x00))) = "CBMS-xxx-0328800387";
const char cRevision_Date[] __attribute__((at(MAGIC_ADDR_BASE + 0x40))) = "Date: "__DATE__;
const char cRevision_Time[] __attribute__((at(MAGIC_ADDR_BASE + 0x60))) = "Time: "__TIME__;
//----------------------------------------------------------------------------------------
// @Prototypes of functions in the module

//========================================================================================
/*!
    \brief      main function
    \param[in]  none
    \param[out] none
    \retval     none
*/
int main(void)
{
    __enable_irq();
		NVIC_PriorityGroupConfig(NVIC_PriorityGroup_1);
	
    app_init();
    SYSTEM_DEBUG("SYS:<< SYSTEM VER:%s (%s)(Build %s %s)\r\n",BMS_SW_VERSION,BMS_HW_VERSION,cRevision_Date,cRevision_Time);	 
    while (1)
    {
        app_task();	
    }
}

/**
 * @brief Assert failed function by user.
 * @param file The name of the call that failed.
 * @param line The source line number of the call that failed.
 */
#ifdef USE_FULL_ASSERT
void assert_failed(const uint8_t* expr, const uint8_t* file, uint32_t line)
{
    while (1)
    {
    }
}
#endif // USE_FULL_ASSERT

// =======================================================================================
// End of file.
// =======================================================================================
